	function OnSubmitForm()
{
		var stillError = 0;
	
		if(document.pressed == "Edit Resident"){										
			if ( checkStudentNumber(document.adminform.student_number.value)== false) stillError++;
		
			document.adminform.action ="LoadEditResidentView";			
			if(stillError > 0)
			{
			    //displayDickHead(); 
				return false;					
			}else{
				return true;				
			}
		}else if(document.pressed == "Main Menu"){
			document.adminform.action ="loadAdminPageView";
			return true;
		}
}
